﻿using System.ComponentModel;
using System.Data;
using System.Windows;
using System.Windows.Data;
using WPFExcelReport.Helpers;
namespace WPFExcelReport
{
    public partial class TVV03 
    {  
        public TVV03()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VVVTLIEF(); 
            this.DataContext = MV;
            InitializeComponent();  
        }
        public override void OnLoadChg(bool value)
        {
            if (!IsCanLoad)
                return;
            string key = VKP;
            VKP = "";
            VKP = key;
            base.OnLoadChg(value);
        }

        public override void LOADBYVKP(string vkp)
        {
            if (!IsCanLoad)
                return;
            TBMain.Clear();
            KEY = ""; 
            if (vkp.Length == 0)
                return; 
           TMV.LOADBYVKP(vkp, IsAuto);
            vwMaster.View.MoveCurrentToFirst();
        }
        public override void OnEXAUFChg(string value)
        {
            if (!IsCanLoad)
                return;
            TBMain.Clear();
            KEY = "";
            if (value.Length == 0)
                return;
            TMV.LOADBYVKP(value, IsAuto);
            vwMaster.View.MoveCurrentToFirst();
            base.OnEXAUFChg(value);
        }
    }
}